Date and Time of
Access of a File

By Hubert Ronald / Leave a response / May 28, 2018

Here the date and time of the file access is obtained using the info class functions.

This snippet was orginally taken from C# Program to View the Date and time of Access of a File

using System;
using System.IO;
class Program
{
    static void Main()
    {
        string path = "C:\\sri\\srip.txt";
        FileInfo info = new FileInfo(path);

        Console.WriteLine("File Creation Time     : {0}", info.CreationTime);
        Console.WriteLine("File Last Access Time  : {0}", info.LastAccessTime);
        Console.WriteLine("File Last Write Time   : {0} ", info.LastWriteTime);
        
        Console.Read();
    }
}





Hubert Ronald

Hiya. I'm Ronald, an Industrial Engineer from Colombia. Hope you enjoyed my ad-free, bullshit-free site. If you liked it, tell someone about it.

Write a response

Your email address will not be published.

RECENT NEWS

Gradient is a small library which offers a clean, minimalistic but powerful API for gradients on mesh canvas when you use it on Gideros Mobile. This script take colors from uiGradients like inspiration.

More information about before here.

SUBSCRIBE

Get monthly updates and free resources.


CONNECT WITH ME